package cn.wolfcode.wolf2w.test;


import lombok.Getter;
import lombok.Setter;

/**
 * 枚举类特点:
 *   1:枚举类构造器是私有
 *   2:枚举类当定义完成之后,实例个数固定
 *   3:剩下操作跟普通一模一样
 */
@Getter
public class MyDate2 {

    public static final MyDate2 DATE1 = new MyDate2("date1", 1L);
    public static final MyDate2 DATE2 = new MyDate2("date2", 2L);
    public static final MyDate2 DATE3 = new MyDate2("date3", 3L);

    @Setter
    private String prefix;
    @Setter
    private Long time;
    public String join(String value){
        return value;
    }
    //private MyDate(){}

    private MyDate2(String prefix, Long time){
        this.prefix = prefix;
        this.time = time;
    }

}
